<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        span {
            list-style: none;
            width: 100px;
            height: 60px;
            line-height: 60px;
            border: 1px solid gray;
            text-align: center;
            display: inline-block;
            margin: 5px;
        }

        li {
            list-style: none;
            display: block;
        }

        .green {
            background-color: green;
        }

        .red {
            background-color: red;
        }

        .orange {
            background-color: orange;
        }

        .gray {
            background-color: gray;
        }

        .blue {
            background-color: blue;
        }

        .aqua {
            background-color: aqua;
        }

        .active {
            font-size: 50px;
        }
    </style>
    <script src="../vue.js"></script>

</head>

<body>
    <div id="wrap">
        <select name="" id="" v-model="licolor">
            <option value="0"> { 红色, 蓝色 }</option>
            <option value="1">{橘子,不知道啥颜色}</option>
            <option value="2"> { 绿色,灰滴 }</option>
        </select>


        <div>
            <li v-for="i in num" :class="i%2==0 ? colorArr[licolor].first : colorArr[licolor].second">
                <span v-for="n in num" v-if="i>=n" @mouseover="over" @mouseout="out">
                    {{n}} x {{i}} = {{i * n}}
                </span>
            </li>
        </div>
    </div>
</body>
<script>


    new Vue({
        el: '#wrap',
        data: {

            licolor: 0,
            num: 9,
            colorArr: [
                { first: 'red', second: 'blue' },
                { first: 'orange', second: 'aqua' },
                { first: 'green', second: 'gray' }
            ],
        },
        methods: {
            over(e) {
                e.target.style.color = 'pink', e.target.style.fontSize = '20px'
            },
            out(e) {
                e.target.style.color = '', e.target.style.fontSize = '16px'
            }
        }
    })

</script>

</html>